<?php
$user = PFactory::getUser();
if(isset($user->cb_usertype) && $user->cb_usertype == 'jobseeker') {
   OCP\App::addNavigationEntry( array( "id" => "jobseeker_index",
                           "order" => 0,
                           "href" => OCP\Util::linkToRoute("jobseeker_home"),
                           "class" => "hr_i_jobseeker",
                           "name" => "应聘管理" ));
   
   OCP\App::addNavigationEntry( array( "id" => "jobseeker_managepersontest",
   "order" => 1,
   "href" => OCP\Util::linkToRoute("jobseeker_managepersontest"),
   "class" => "hr_i_managepersontest",
   "name" => "评测管理" ));
   
   OCP\App::addNavigationEntry( array( "id" => "jobseeker_settings",
   "order" => 2,
   "href" => OCP\Util::linkToRoute("jobseeker_settings"),
   "class" => "hr_i_setting",
   "name" => "账户设置" ));   
}
/* link to joomla framework */

require_once(OC::$SERVERROOT.'/apps/joomla/application.php');

JLoader::import('joomla.application.component.model', JPATH_LIBRARIES);
JLoader::register("Securimage", JPATH_SITE.'/components/com_captcha/securimage/securimage.php');
JLoader::register("CensorHelper", JPATH_SITE.'/components/com_censor/helper.php');
JLoader::register('PInterviewHelper', OC::$SERVERROOT."/apps/interview/lib/helper.php");
// init pipapai application 
PFactory::init(); 
